package com.itheima.stock.service.impl;

import com.itheima.stock.domain.StockBlockRtInfoDao;
import com.itheima.stock.mapper.StockBlockRtInfoMapper;
import com.itheima.stock.service.StockBlockRtInfoService;
import com.itheima.stock.vo.resp.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

/**
 * @ClassName StockBlockRtInfoServiceImpl
 * @Description TODO
 * @date 2023/2/28 10:50
 * @Version 1.0
 */
@Service
public class StockBlockRtInfoServiceImpl implements StockBlockRtInfoService {
    @Autowired
    StockBlockRtInfoMapper stockBlockRtInfoMapper;
    @Override
    public R<List<StockBlockRtInfoDao>> selectBlackAll() {
       List<StockBlockRtInfoDao> ret =  stockBlockRtInfoMapper.selectBlackAll();
       if (Objects.isNull(ret)|| ret.isEmpty()){
           return R.error("数据相应异常");
       }
        return R.ok(ret);
    }
}
